//
//  ForumCollectionCell.m
//  Blank
//
//  Created by 周星宇 on 15/9/28.
//  Copyright © 2015年 dllo. All rights reserved.
//

#import "ForumCollectionCell.h"

@implementation ForumCollectionCell


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.imageView = [[UIImageView alloc] init];
        self.titleLabel = [[UILabel alloc] init];
        self.numLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.imageView];
        [self.contentView addSubview:self.titleLabel];
        [self.contentView addSubview:self.numLabel];
    }
    
    
   
    return self;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.imageView.frame = CGRectMake(0, 0, 80 * Windth, 50 * Height);
    self.titleLabel.frame = CGRectMake(100 * Windth, 5 * Height, 80 * Windth, 40 * Height);
    self.titleLabel.font = [UIFont systemFontOfSize:10];
    self.numLabel.frame = CGRectMake(100 * Windth, 35 * Height, 80 * Windth, 20 * Height);
    self.numLabel.font = [UIFont systemFontOfSize:11];
    
    if ([NightModel getColorModel]) {
        self.contentView.backgroundColor = [UIColor grayColor];
        self.titleLabel.backgroundColor = [UIColor grayColor];
        self.titleLabel.textColor = [UIColor whiteColor];
        self.numLabel.backgroundColor = [UIColor grayColor];
        self.numLabel.textColor = [UIColor whiteColor];
    }
    else{
        self.contentView.backgroundColor = [UIColor whiteColor];
        self.titleLabel.backgroundColor = [UIColor whiteColor];
        self.titleLabel.textColor = [UIColor blackColor];
        self.numLabel.backgroundColor = [UIColor whiteColor];
        self.numLabel.textColor = [UIColor grayColor];
    }
}


@end
